package dp.strategy;

import dp.strategy.behavior.interfaces.FlyBehavior;
import dp.strategy.behavior.interfaces.QuackBehavior;

public abstract class GeneralDuck {
	
	private FlyBehavior flyBehavior;
	private QuackBehavior quackBehavior;
	
	protected void swim() {
		System.out.println("All ducks float, even decoys!");
	}
	public void peformFly() {
		flyBehavior.fly();
	}
	public void peformQuack() {
		quackBehavior.quack();
	}
	
	protected abstract void display();

	public void setFlyBehavior(FlyBehavior flyBehavior) {
		this.flyBehavior = flyBehavior;
	}

	public void setQuackBehavior(QuackBehavior quackBehavior) {
		this.quackBehavior = quackBehavior;
	}
}
